<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>后台登录</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
</head>
<body class="main_body">
<div class="logo">
</div>
<div class="content">
    <div class="login">

        <div class="message">操作员登录</div>
        <div id="darkbannerwrap"></div>

        <form id="loginForm" class="layui-form layui-form-pane" th:action="@{/api/console/loginto}" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <input type="text" name="username" id="username" lay-verify="username" placeholder="用户名"
                           autocomplete="off"
                           class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <input type="password" name="password" id="password" lay-verify="password"
                           placeholder="密   码" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <span th:text="${message}"></span>
            <div class="layui-form-item">
                <div class="layui-input-block logindiv" style=" margin-left: 0px;">
                    <button class="layui-btn layui-btn-normal loginbtn" type="button">登录</button>
                </div>
            </div>
            <input type="text" id="time"/>
        </form>
    </div>
</div>
<!-- 底部 -->
<div class="footers">
    <strong></strong>
</div>
<script type="text/javascript" th:src="@{/static/js/jquery.min.js}"></script>
<script>
    $(".loginbtn").click(function () {
        if($("#username").val() == ""){
            alert("请输入用户名");
        }else if($("#password").val() == ""){
            alert("请输入密码");
        }else{
            $("#loginForm").submit();
        }
    });
</script>
</body>
</html>